{% extends 'TopxiaWebBundle::layout.html.twig' %}

{% block title %}我的学习 - {{ parent() }}{% endblock %}

{% block content %}

{{ render(controller('TopxiaWebBundle:My:avatarAlert')) }}

<div class="row row-3-9">
  <div class="col-md-3">
    <div class="sidenav">
      {% if app.user.isTeacher() %}
	   <ul class="list-group">
          <li class="list-group-heading">面授课程</li>
            <li class="list-group-item {% if side_nav == 'offline' %} active {% endif %}">
              <a href="{{path('my_offline')}}">订单列表
              </a>
           </li>
        </ul>
        <ul class="list-group">
          <li class="list-group-heading">我的教学</li>
          <li class="list-group-item
           {% if side_nav == 'my-teaching-courses' %} active {% endif %}">
            <a href="{{path('my_teaching_courses')}}">在教课程</a>
          </li>

          {% if setting('classroom.enabled')|default(0) %}
            <li class="list-group-item {% if side_nav == 'my-teaching-classroom' %} active {% endif %}">
              <a href="{{path('my_teaching_classrooms')}}">所在{{ setting('classroom.name')|default("班级") }}
              </a>
           </li>
          {% endif %}

          <li class="list-group-item {% if side_nav == 'my-teaching-questions' %}active {% endif %}">
            <a href="{{path('my_teaching_threads', {type:'question'}) }}">{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}问答
            </a>
          </li>
          <li class="list-group-item {% if side_nav == 'my-teaching-discussions' %} active {% endif %}">
            <a href="{{path('my_teaching_threads', {type:'discussion'}) }}">{% if setting('default.user_name') %}{{setting('default.user_name')|default('学员')}}{% else %}学员{% endif %}话题</a>
          </li>
          
          <li class="list-group-item {% if side_nav == 'my-teaching-check' %} active {% endif %}">
            <a href="{{path('course_manage_list_teacher_test_reviewing') }}">试卷批阅
            </a>
          </li>
          
          {% if is_plugin_installed('Homework') %}
            <li class="list-group-item {% if side_nav == 'my-teaching-homework-check' %} active {% endif %}">
              <a href="{{path('my_teaching_homework_list') }}">作业批改</a>
            </li>
          {% endif %}

          {% if is_plugin_installed('MaterialLib') %}
            <li class="list-group-item {% if side_nav == 'material-lib' %} active {% endif %}">
              <a href="{{path('material_lib_browsing') }}">教学资料库</a>
            </li>
          {% endif %}
        </ul>
      {% endif %}
        
      <ul class="list-group">
        <li class="list-group-heading">我的学习</li>
        <li class="list-group-item {% if side_nav == 'my-learning' %} active {% endif %}">
          <a href="{{path('my_courses_learning')}}">我的课程</a>
        </li>

        {% if setting('classroom.enabled')|default(0) %}
          <li class="list-group-item {% if side_nav == 'my-classroom' %} active {% endif %}">
            <a href="{{path('my_classrooms')}}">我的{{ setting('classroom.name')|default("班级") }}</a>
          </li>
        {% endif %}

        <li class="list-group-item
        {% if side_nav == 'my-questions' %} active {% endif %}" >
          <a href="{{path('my_questions')}}">我的问答</a>
        </li>
        <li class="list-group-item
        {% if side_nav == 'my-discussions' %} active {% endif %}">
          <a href="{{path('my_discussions')}}">我的话题</a>
        </li>
        <li class="list-group-item
        {% if side_nav == 'my-notes' %} active {% endif %}">
          <a href="{{path('my_notebooks')}}">我的笔记</a>
        </li>
      
        {% if is_plugin_installed('Homework') %}
          <li class="list-group-item {% if side_nav == 'my-homeworks' %} active {% endif %}">
            <a href="{{ path('my_homework_list') }}">我的作业</a>
          </li>
        {% endif %}
       <!--
        <li class="list-group-item
        {% if side_nav == 'my-quiz' %} active {% endif %}" >
          <a href="{{path('my_quiz')}}">我的考试</a>
        </li>
        -->
        <li class="list-group-item
        {% if side_nav == 'my-group' %} active {% endif %}">
          <a href="{{path('group_member_center')}}">我的小组</a>
        </li>
        {% if is_plugin_installed('ClassroomPlan') %}
          <li class="list-group-item
          {% if side_nav == 'my-task' %} active {% endif %}" >
            <a href="{{path('my_task_calendar')}}">我的任务</a>
          </li>
        {% endif %}
      </ul>
    </div>
  </div>
  <div class="col-md-9">{% block main %}{% endblock %}</div>
</div>

{% endblock %}